#include <string>
#include <iostream>
#include "pub/err.h"
#include "pub/log.h"
#include "biz/pub_sys.h"
#include "biz/pub_log.h"
#include "biz/pub_serial.h"
#include "test_pub_log.h"

using namespace std;
using namespace oracle::occi;

TestPubLog::TestPubLog()
{
	log = new PubLog(conn);
	sys = new PubSystem(conn);
	serial = new PubSerial(conn);

	sys->init();
}

TestPubLog::~TestPubLog()
{
	delete log;
	delete sys;
	delete serial;
}

void TestPubLog::test_writeLog()
{
	Log::debug("开始测试 PubLog::writeLog");
	//serial->tradeDate = sys->tradeDate;
	//serial->genOrderSerial();
	//log->orderSerialNo = serial->orderSerialNo;
	log->serviceCode = "101201";
	log->acceptMethod = "0";
	log->channelCode = "001";
	log->regionCode = "00";
	log->branchCode = "00010001";
	log->opID = "10000003";
	log->opDate = sys->tradeDate;
	log->opTime = sys->tradeTime;
	log->ipAddr = "192.168.1.200";
	log->macAddr = "00-50-8D-9E-0B-CB";
	log->returnCode = "0000";
	log->returnMsg = "交易账户开户成功";
	log->writeLog();
}
